{% extends "base.html" %} {% block title %}Refunds - Quick Care Connect{% endblock %} {% block content %}
| ID | Appointment | Patient | Reason | Amount (PKR) | Payout Details | Status | Created | Proof | {% if status_filter not in ['completed', 'processed'] %}Action | {% endif %}|
|---|---|---|---|---|---|---|---|---|---|---|
| {{ r.id }} | #{{ r.appointment_id }} | {{ r.patient.user.name if r.patient and r.patient.user else '-' }} | {% set reason_key = (r.reason or '')|lower %} {% if reason_key == 'mutual_no_show' %} Mutual No Show {% elif reason_key == 'doctor_no_show' %} Doctor No Show {% elif reason_key.startswith('cancellation_') %} {{ (r.reason or 'cancellation')|replace('_', ' ')|title }} {% else %} {{ (r.reason or 'other')|replace('_', ' ')|title }} {% endif %} | {{ "%.2f"|format(r.amount) }} |
{% if r.payout_detail %}
{{ r.payout_detail.payment_method|replace('_', ' ')|title }}
{{ r.payout_detail.account_title }}
{% if r.payout_detail.iban %}IBAN: {{ r.payout_detail.iban }} {% endif %}
{% if r.payout_detail.account_number %}Acct: {{ r.payout_detail.account_number }} {% endif %}
{% if r.payout_detail.wallet_number %}Wallet: {{ r.payout_detail.wallet_number }} {% endif %}
|
{{ r.status }} | {{ r.created_at.strftime('%d %b %Y %H:%M') if r.created_at else '-' }} | {% if r.payout_detail and r.payout_detail.admin_proof_path %} View {% else %} - {% endif %} | {% if status_filter not in ['completed', 'processed'] and r.status == 'pending' %}{% elif status_filter not in ['completed', 'processed'] %} | {% endif %} |